// 广告代理商消耗统计相关类型定义

/** 筛选表单属性 */
export interface FilterFormProps {
  /** 日期范围 */
  date_range: string[];
  /** 投放组ID数组 */
  department_ids: number[];
  /** 平台ID数组 */
  platform_ids: number[];
  /** 广告计划ID */
  ad_plan_id?: number;
}

/** 投放组选项 */
export interface DepartmentOption {
  value: number;
  label: string;
}

/** 平台选项 */
export interface PlatformOption {
  value: number;
  label: string;
}

/** 广告计划选项 */
export interface AdPlanOption {
  value: number;
  label: string;
}

/** 代理商信息 */
export interface AgentInfo {
  id: number;
  name: string;
  platform: number;
  platform_text: string;
}

/** 单元格数据 */
export interface CellData {
  amount: number;
  formatted_amount: string;
}

/** 表格行数据 */
export interface TableRowData {
  date: string;
  date_formatted: string;
  agents: Record<number, CellData>;
}

/** 汇总数据 */
export interface SummaryData {
  [agentId: number]: CellData;
}

/** 统计数据响应 */
export interface StatisticsResponse {
  date_range: {
    start: string;
    end: string;
  };
  agents: AgentInfo[];
  table_data: TableRowData[];
  summary: SummaryData;
}

/** 筛选选项响应 */
export interface FilterOptionsResponse {
  department_options: DepartmentOption[];
  platform_options: PlatformOption[];
  ad_plan_options: AdPlanOption[];
}
